package com.kun.portal.webframe.service;

import com.kun.portal.webframe.dao.VehicleDispatchDao;
import com.kun.portal.webframe.po.AppointmentPo;
import com.kun.portal.webframe.po.RoomPo;
import com.kun.portal.webframe.po.VehicleDispatchPo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;

import javax.persistence.EntityManager;
import java.util.List;

/**
 * Created by Administrator on 2018/5/10.
 */
@Service
public class VehicleDispatchService {
    @Autowired
    private VehicleDispatchDao vehicleDispatchDao;
    @Autowired
    private EntityManager eM;

    public List<VehicleDispatchPo> findALL(){
        return vehicleDispatchDao.findAll();
    }

    public VehicleDispatchPo saveVehicleDispatchPo(VehicleDispatchPo vehicleDispatchPo) {
        return vehicleDispatchDao.save(vehicleDispatchPo);
    }
    public void editVehicleDispatchPo(VehicleDispatchPo vehicleDispatchPo) {
        eM.refresh(vehicleDispatchPo);
    }




}